// Mesh Loader
// (c) jimon game studio

#ifndef JEH_IMESHLOADER
#define JEH_IMESHLOADER

#include "jeUnknown.h"
#include "IBuffer.h"
#include "jeSingleton.h"
#include "IMeshFormatLoader.h"

namespace je
{
	namespace scene
	{
		//! Mesh Loader
		class IMeshLoader:public je::jeUnknown
		{
		public:

			//! Destructor
			virtual ~IMeshLoader()
			{
			}

			//! Load Mesh
			virtual jeMesh * LoadMesh(core::IBuffer * DataBuffer,video::IRender * Render) = 0;

			//! Save Mesh
			virtual void SaveMesh(core::IBuffer * Buffer,jeMesh * Mesh,MeshFormat Format) = 0;

			//! Register Format Loader
			virtual void RegisterFormatLoader(IMeshFormatLoader * FormatLoader) = 0;

			//! UnRegister Format Loader
			virtual void UnRegisterFormatLoader(IMeshFormatLoader * FormatLoader) = 0;

			//! Get Format Loader
			virtual IMeshFormatLoader * GetFormatLoader(MeshFormat Format) = 0;
		};

		DECLARE_SINGLETON_E(JE_ENGINE_FUNCTION_API,JE_ENGINE_FUNCTION_CALL,MeshLoader)
	}
}

#endif
